home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / Demos_Files / Genetic_Optimization / Before GA MLP Example.nsm next >
Encoding:
Text File  |  2002-03-08  |  6.6 KB  |  149 lines

  1. NextMacroPath = macro. pathFromMacro ( "GA Controller Added.nsm" )
  2. nextButton. setMacroPath ( NextMacroPath )
  3. TextBoxPath = macro. pathFromMacro ( "TextBox.txt" )
  4. SubtitleIndex = subtitleTextBox. setTextFromFile (TextBoxPath, 1)
  5. MainIndex = mainTextBox. setTextFromFile (TextBoxPath, 1)
  6.  
  7. activeBreadboard. showOpenProbes ( TRUE )
  8. activeBreadboard. setAnimatePoint ( 7 , 220 )
  9. activeBreadboard. stampAndMove ( "Axon" , "axon" )
  10. activeBreadboard. setAnimatePoint ( 90 , 220 )
  11. activeBreadboard. stampAndMove ( "FullSynapse" , "fullSynapse" )
  12. activeBreadboard. setAnimatePoint ( 184 , 220 )
  13. activeBreadboard. stampAndMove ( "TanhAxon" , "tanhAxon" )
  14. activeBreadboard. setAnimatePoint ( 275 , 220 )
  15. activeBreadboard. stampAndMove ( "FullSynapse" , "fullSynapse1" )
  16. activeBreadboard. setAnimatePoint ( 372 , 220 )
  17. activeBreadboard. stampAndMove ( "TanhAxon" , "tanhAxon1" )
  18. activeBreadboard. setAnimatePoint ( 464 , 220 )
  19. activeBreadboard. stampAndMove ( "FullSynapse" , "fullSynapse2" )
  20. activeBreadboard. setAnimatePoint ( 554 , 220 )
  21. activeBreadboard. stampAndMove ( "TanhAxon" , "tanhAxon2" )
  22. activeBreadboard. setAnimatePoint ( 647 , 220 )
  23. activeBreadboard. stampAndMove ( "L2Criterion" , "criterion" )
  24.  
  25. axon. connectTo ( "fullSynapse" )
  26. fullSynapse. connectTo ( "tanhAxon" )
  27. tanhAxon. connectTo ( "fullSynapse1" )
  28. fullSynapse1. connectTo ( "tanhAxon1" )
  29. tanhAxon1. connectTo ( "fullSynapse2" )
  30. fullSynapse2. connectTo ( "tanhAxon2" )
  31. tanhAxon2. connectTo ( "criterion" )
  32.  
  33. activeBreadboard. stampOnAndMove ( "BackCriteriaControl" , "criterion" )
  34. activeBreadboard. stampOnAndMove ( "BackTanhAxon" , "tanhAxon2" )
  35. activeBreadboard. stampOnAndMove ( "BackTanhAxon" , "tanhAxon1" )
  36. activeBreadboard. stampOnAndMove ( "BackTanhAxon" , "tanhAxon" )
  37. activeBreadboard. stampOnAndMove ( "BackAxon" , "axon" )
  38. activeBreadboard. stampOnAndMove ( "BackFullSynapse" , "fullSynapse2" )
  39. activeBreadboard. stampOnAndMove ( "BackFullSynapse" , "fullSynapse1" )
  40. activeBreadboard. stampOnAndMove ( "BackFullSynapse" , "fullSynapse" )
  41. activeBreadboard. stampOnAndMove ( "Momentum" , "tanhAxon2Backprop" )
  42. activeBreadboard. stampOnAndMove ( "Momentum" , "fullSynapse2Backprop" )
  43. activeBreadboard. stampOnAndMove ( "Momentum" , "tanhAxon1Backprop" )
  44. activeBreadboard. stampOnAndMove ( "Momentum" , "fullSynapse1Backprop" )
  45. activeBreadboard. stampOnAndMove ( "Momentum" , "tanhAxonBackprop" )
  46. activeBreadboard. stampOnAndMove ( "Momentum" , "fullSynapseBackprop" )
  47. activeBreadboard. setAnimatePoint ( 6 , 200 )
  48. activeBreadboard. stampAndMove ( "StaticControl" , "control" )
  49. activeBreadboard. stampOnAndMove ( "BackStaticControl" , "control" )
  50.  
  51. activeBreadboard. stampOnAndMove ( "File" , "axon" )
  52. file. setActiveAccessPoint ( "Pre-Activity" )
  53.  
  54. class_trn_path = macro. pathFromMacro("class_train.txt")
  55. class_cv_path = macro. pathFromMacro("class_cv.txt")
  56. class_trndes_path = macro. pathFromMacro("class_des_train.txt")
  57. class_cvdes_path = macro. pathFromMacro("class_des_cv.txt")
  58.  
  59. percentCorrectDLLPath = macro.pathFromMacro("MatrixViewerPercentCorrect.dll")
  60.  
  61. file. addFile ( class_cv_path , FALSE )
  62. file. matchPEsWithColumns (  )
  63. file. addFile ( class_trn_path , FALSE )
  64. file. setActiveFileNameAndDataSet ( "class_cv.txt" , "Training" )
  65. file. setDataSetForActiveFile ( "Cross Validation" )
  66. file. translate (  )
  67. file. setLowerBound ( -1.000000 )
  68. activeBreadboard. stampOnAndMove ( "File" , "criterion" )
  69. file1. setActiveAccessPoint ( "Activity" )
  70. activeBreadboard. select ( "file1" , FALSE )
  71. file1. addFile ( class_cvdes_path , FALSE )
  72. file1. setDataSetForActiveFile ( "Cross Validation" )
  73. file1. addFile ( class_trndes_path , FALSE )
  74. file1. setActiveAccessPoint ( "Desired Signal" )
  75. file1. setLowerBound ( -1.000000 )
  76.  
  77. file1. translate (  )
  78.  
  79. fullSynapseBackpropGradient. setStepSize ( 1.000000 )
  80. tanhAxonBackpropGradient. setStepSize ( 1.000000 )
  81. fullSynapse2BackpropGradient. setStepSize ( 0.010000 )
  82.  
  83. tanhAxon. setRows ( 10 )
  84. tanhAxon1. setRows ( 5 )
  85. axon. setRows (5)
  86. activeBreadboard. stampOnAndMove ( "MatrixViewer" , "criterion" )
  87. matrixViewer. setActiveAccessPoint ( "Cost" )
  88. matrixViewer. setActiveAccessPoint ( "Confusion Matrix (Totals)" )
  89. matrixViewer. setFixWindowTitle ( TRUE )
  90. matrixViewer. setWindowTitle ( "Classification Performance of Non-Optimized MLP" )
  91.  
  92. matrixViewer. openEngineWindow (  )
  93. matrixViewer. tileWindow (2,3,4,5)
  94. //matrixViewer. moveEngineWindow ( 429 , 430 )
  95.  
  96. control. setEpochs ( 250 )
  97. control. setXValDataSet ( "Cross Validation" )
  98. controlBackprop. setGradientClassName ( "Momentum" )
  99.  
  100. activeBreadboard. stampOnAndMove ( "DataGraph" , "criterion" )
  101. dataGraph. setShowZeroOnYAxis ( TRUE )
  102. dataGraph. setFixWindowTitle ( TRUE )
  103. dataGraph. setWindowTitle ( "Non-Optimized MLP Learning Curve (Average Cost per Epoch)" )
  104. dataGraph. setActiveAccessPoint ( "Average Cost" )
  105. dataGraph. setAutoAdjustY ( FALSE )
  106. dataGraph. setMaxY ( 0.500000 )
  107. dataGraph. setWindowSize ( 250 )
  108. activeBreadboard. select ( "dataGraph" , FALSE )
  109. activeBreadboard. select ( "matrixViewer" , FALSE )
  110.  
  111. dataGraph. openEngineWindow (  )
  112. dataGraph. tileWindow (1,3,3,3 )
  113. //dataGraph. moveEngineWindow ( 10, 430 )
  114.  
  115. criterion. setAutoSave ( FALSE )
  116.  
  117. activeBreadboard. setAnimatePoint ( 663 , 118 )
  118. activeBreadboard. stampAndMove ( "ButtonEngine" , "controlButton" )
  119. controlButton. setText ("Run")
  120. ControlMacroPath = macro. pathFromNS ( "Macros\reset&RunNetwork.nsm" )
  121. controlButton. setMacroPath ( ControlMacroPath )
  122. controlButton. setItalic ( TRUE )
  123. controlButton. setFontSize ( 18 )
  124. controlButton. setColor ( 255 , 0 , 0 )
  125.  
  126. activeBreadboard. stampOnAndMove ( "DataWriter" , "matrixViewer" )
  127. activeBreadboard. stampOnAndMove ( "DLLPostprocessor" , "dataWriter" )
  128.  
  129. dLLPostprocessor. setDLLName ( "MatrixViewerPercentWrong" , percentCorrectDLLPath )
  130. dLLPostprocessor. activateDLL ( TRUE )
  131.  
  132. activeBreadboard. stampOnAndMove ( "DataGraph" , "dLLPostprocessor" )
  133. dataGraph1. setActiveAccessPoint ( "Stacked Access" )
  134. activeBreadboard. select ( "dataGraph1" , FALSE )
  135. dataGraph1. setActiveAccessPoint ( "Postprocessor Output" )
  136. dataGraph1. setFixWindowTitle ( TRUE )
  137. dataGraph1. setWindowTitle ( "Percentage Correct Classification" )
  138. dataGraph1. setWindowTitle ( "Percentage Correct Classification per Epoch" )
  139. dataGraph1. setWindowTitle ( "% Correct Classification of Non-Optimized MLP" )
  140. dataGraph1. setWindowSize ( 250 )
  141. dataGraph1. setShowZeroOnYAxis ( TRUE )
  142. dataGraph1. setAutoAdjustY ( FALSE )
  143. dataGraph1. setMaxY ( 100.000000 )
  144. dataGraph1. setMinY ( 50.000000 )
  145. dataGraph1. setXAxisAsEpochs (  )
  146. dataGraph1. openEngineWindow (  )
  147. dataGraph1. tileWindow(2,3,4,4)
  148. dataGraph. setShowLabels ( FALSE )
  149. dataGraph1. setShowLabels ( FALSE )